Previous | Home | Next |
WCF make a distinction between transport reliability and message reliability. Transport reliability describes point-to-point guaranteed delivery at the network packet level, as well as guarantees the order of the packets. Transport reliability is not resilient to dropping network connections and a variety of other communication problems.
Message reliability deals with managing the connection itself via connection verification and cleanup when no longer needed also deals with reliability at the message level independent of how many packets are required to deliver the message and provides for end-to-end guaranteed delivery and order of messages, regardless of how many intermediaries are involved, and how many network hops are required to deliver the message from the client to the service.
Message reliability is based on an industry standard for reliable message-based communication that maintains a session at the transport level.Message reliability offers retries in case of transport failures such as dropping a wireless connection; it automatically deals with congestion, message buffering, and flow control; and it can adjust the number of messages accordingly.
Reliability and binding:
Name | Supports reliability | Default reliability | Supports ordered | Default ordered |
BasicHttpBinding | No | N/A | No | N/A |
BasicHttpBinding | Yes | Off | Yes | On |
BasicHttpBinding | No | N/A | No | N/A |
NetNamedPipeBinding | No | N/A (On) | Yes | N/A(On) |
WSHttpBinding | Yes | Off | Yes | On |
WSFederationHttpBinding | Yes | Off | Yes | On |
WSDualHttpBinding | Yes | On | Yes | On |
NetMsmqBinding | No | N/A | No | N/A |
MsmqIntegrationBinding | No | N/A | No | N/A |
Message reliability provides ordered delivery assurance, which allow messages to be executed in the order they were sent, not in the order in which they were delivered. It guarantees that messages are delivered exactly once.
WCF enable reliability but not ordered delivery, in which case messages are delivered in the order in which they were received. The default for all bindings that support reliability is that when reliability is enabled, ordered delivery is enabled as well.
Enabling reliability with the TCP binding
<system.serviceModel> <services> <service name = "MyService"> <endpoint address = "net.tcp://localhost:8000/MyService" binding = "netTcpBinding" bindingConfiguration = "ReliableTCP" contract = "IMyContract"/> </service> </services> <bindings> <netTcpBinding> <binding name = "ReliableTCP"> <reliableSession enabled = "true"/> </binding> </netTcpBinding> </bindings> </system.serviceModel>
Previous | Home | Next |